package com.watson.patterns.structure.decorator;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

public class RedShapeDecorator extends ShapeDecorator{

    public RedShapeDecorator(ShapeBase shape) {
        super(shape);
    }

    @Override
    public void draw() {
        shapeDecorator.draw();
        setRedBorder(shapeDecorator);
    }

    private void setRedBorder(ShapeBase decoratedShape){
        System.out.println("Border Color: Red");
    }

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        ConcurrentHashMap hashMap;

        ShapeBase circle = new Circle();
        ShapeDecorator redCircle = new RedShapeDecorator(new Circle());
        ShapeDecorator redRectangle = new RedShapeDecorator(new Rectangle());
        //Shape redCircle = new RedShapeDecorator(new Circle());
        //Shape redRectangle = new RedShapeDecorator(new Rectangle());
        System.out.println("Circle with normal border");
        circle.draw();

        System.out.println("\nCircle of red border");
        redCircle.draw();

        System.out.println("\nRectangle of red border");
        redRectangle.draw();
    }

}
